//
//  ImageDownloader.h
//  Lesson_17_ImageDownloader
//
//  Created by lanou3g on 15-4-8.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@protocol ImageDownloaderDelegate <NSObject>

@optional
//下载图片之后 执行此方法
- (void)imageDownloaderDidFinishDownloadImage:(UIImage *)image;

@end
//声明block类型
typedef void (^Result) (UIImage *image);

@interface ImageDownloader : NSObject
//注意两个参数
+ (void)imageDownloaderWithURLStr:(NSString *)urlStr delagate:(id <ImageDownloaderDelegate>)delegate;


//声明block方法
+ (void)imageDownloaderWithURLStr:(NSString *)urlStr result:(Result)result;
@end
